package com.shujia.springboot.dao;

import com.shujia.springboot.entity.StuSumScore;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface StuSumScoreDao extends JpaRepository<StuSumScore, Integer> {
    @Query(value = "select * from stu_sum_score where clazz like %?%", nativeQuery = true)
    public Page<StuSumScore> findByClazzOption(String clazz, PageRequest pg);

    @Query(value = "select * from stu_sum_score where name like %?%", nativeQuery = true)
    public Page<StuSumScore> findByNameOption(String name, PageRequest pg);
}
